package com.lagou.demo.controller;

import com.lagou.demo.service.DemoService;
import com.lagou.edu.mvcframework.annotations.LagouAutowired;
import com.lagou.edu.mvcframework.annotations.LagouController;
import com.lagou.edu.mvcframework.annotations.LagouRequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Auther: whh
 * @Date: 2021/3/30 0030
 * @Description:
 */
@LagouController
@LagouRequestMapping("/demo")
public class DemoController {

    @LagouAutowired
    private DemoService demoService;

    /***
     * @Desc: url:/demo/query
     * @param request
     * @param response
     * @param name
     * @return {@link String}
     * @author wonder
     * @date 2021/3/31 0031
     */
    @LagouRequestMapping("/query")
    public String query(HttpServletRequest request, HttpServletResponse response,String name){
        return demoService.get(name);
    }

}
